package com.example.demo.controller;

import com.example.demo.bean.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

    @Autowired
    JdbcTemplate jdbcTemplate;

    @Autowired
    UserService userService;
    @GetMapping("/user")
    public User getUserInfo(@RequestParam("user_id") Long user_id){
        return userService.getUserInfoByUserId(user_id);
    }

}
